<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

/*Route::get('/', function () {
    return view('welcome');
})->name('mywelcome');*/


Route::any('loginPage',['uses'=>'MemberController@loginPage']);
Route::any('registerPage',['uses'=>'MemberController@registerPage']);

Route::group(['middleware'=>['web']],function (){
    Route::any('registerDao',['uses'=>'MemberController@registerDao']);
    Route::any('loginDao',['uses'=>'MemberController@loginDao']);
});


Route::any('sendSMS',['uses'=>'SmsController@sendSMS']);

Route::any('captcha',['uses'=>'CapcodeController@captcha']);


Route::group(['middleware'=>['autologin']],function (){
    Route::any('/',['uses'=>'HomeController@homePage'])->name('home');
});

Route::any('allProducts',['uses'=>'HomeController@allProducts']);

Route::any('categoryPage/{cateid}',['uses'=>'CategoryController@categoryPage']);

Route::any('searchProducts',['uses'=>'SearchController@searchProducts']);

Route::any('proDetails/{products_id}',['uses'=>'DetailsController@proDetails']);

Route::any('addWish',['uses'=>'WishController@addWish']);

Route::any('wishpage',['uses'=>'WishController@wishpage']);

Route::any('cartpage',['uses'=>'CartController@cartpage']);
Route::any('addCart',['uses'=>'CartController@addCart']);

Route::any('alipay',['uses'=>'AlipayController@Alipay']);
Route::any('return',['uses'=>'AlipayController@AlipayReturn']);
